home *** CD-ROM | disk | FTP | other *** search
- if(stop eq "0")
- {
- Q = "0";
- while(q < "4")
- {
- q += "1";
- gostx = getProperty("/gost" add q, _X);
- gosty = getProperty("/gost" add q, _Y);
- if(gostx eq "150" and gosty eq "40")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "200" and gosty eq "40")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "260" and gosty eq "40")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "290" and gosty eq "40")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "350" and gosty eq "40")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "400" and gosty eq "40")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "150" and gosty eq "80")
- {
- set("go" add q,"1101");
- }
- else if(gostx eq "200" and gosty eq "80")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "230" and gosty eq "80")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "260" and gosty eq "80")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "290" and gosty eq "80")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "320" and gosty eq "80")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "350" and gosty eq "80")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "400" and gosty eq "80")
- {
- set("go" add q,"1110");
- }
- else if(gostx eq "150" and gosty eq "110")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "200" and gosty eq "110")
- {
- set("go" add q,"1110");
- }
- else if(gostx eq "230" and gosty eq "110")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "260" and gosty eq "110")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "290" and gosty eq "110")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "320" and gosty eq "110")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "350" and gosty eq "110")
- {
- set("go" add q,"1101");
- }
- else if(gostx eq "400" and gosty eq "110")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "230" and gosty eq "140")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "260" and gosty eq "140")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "290" and gosty eq "140")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "320" and gosty eq "140")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "140" and gosty eq "170")
- {
- setProperty("/gost" add q, _X, "400");
- setProperty("/gost" add q, _Y, "170");
- set("go" add q,"0011");
- }
- else if(gostx eq "200" and gosty eq "170")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "230" and gosty eq "170")
- {
- set("go" add q,"1110");
- }
- else if(gostx eq "320" and gosty eq "170")
- {
- set("go" add q,"1101");
- }
- else if(gostx eq "350" and gosty eq "170")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "410" and gosty eq "170")
- {
- set("go" add q,"0011");
- setProperty("/gost" add q, _X, "150");
- setProperty("/gost" add q, _Y, "170");
- }
- else if(gostx eq "230" and gosty eq "200")
- {
- set("go" add q,"1101");
- }
- else if(gostx eq "320" and gosty eq "200")
- {
- set("go" add q,"1110");
- }
- else if(gostx eq "200" and gosty eq "230")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "230" and gosty eq "230")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "260" and gosty eq "230")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "290" and gosty eq "230")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "320" and gosty eq "230")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "350" and gosty eq "230")
- {
- set("go" add q,"1111");
- }
- else if(gostx eq "400" and gosty eq "230")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "150" and gosty eq "230")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "150" and gosty eq "260")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "170" and gosty eq "260")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "200" and gosty eq "260")
- {
- set("go" add q,"1101");
- }
- else if(gostx eq "230" and gosty eq "260")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "260" and gosty eq "260")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "290" and gosty eq "260")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "320" and gosty eq "260")
- {
- set("go" add q,"0111");
- }
- else if(gostx eq "350" and gosty eq "260")
- {
- set("go" add q,"1110");
- }
- else if(gostx eq "380" and gosty eq "260")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "400" and gosty eq "260")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "150" and gosty eq "290")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "170" and gosty eq "290")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "200" and gosty eq "290")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "230" and gosty eq "290")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "260" and gosty eq "290")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "290" and gosty eq "290")
- {
- set("go" add q,"0101");
- }
- else if(gostx eq "320" and gosty eq "290")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "350" and gosty eq "290")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "380" and gosty eq "290")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "400" and gosty eq "290")
- {
- set("go" add q,"0110");
- }
- else if(gostx eq "150" and gosty eq "320")
- {
- set("go" add q,"1001");
- }
- else if(gostx eq "260" and gosty eq "320")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "290" and gosty eq "320")
- {
- set("go" add q,"1011");
- }
- else if(gostx eq "400" and gosty eq "320")
- {
- set("go" add q,"1010");
- }
- else if(gostx eq "250" and gosty eq "160")
- {
- r = random("2");
- if(eval("munch" add q) eq "1")
- {
- set("munch" add q,"0");
- }
- else if(r eq "0")
- {
- call("down" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- }
- else if(gostx eq "280" and gosty eq "160")
- {
- if(eval("munch" add q) eq "1")
- {
- tellTarget("/gost" add q)
- {
- gotoAndStop(1);
- }
- set("munch" add q,"0");
- }
- r = random("3");
- if(r eq "0")
- {
- call("left" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- else if(r eq "2")
- {
- call("up" add q);
- }
- }
- else if(gostx eq "270" and gosty eq "160")
- {
- if(eval("munch" add q) eq "1")
- {
- tellTarget("/gost" add q)
- {
- gotoAndStop(1);
- }
- set("munch" add q,"0");
- }
- r = random("3");
- if(r eq "0")
- {
- call("left" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- else if(r eq "2")
- {
- call("up" add q);
- }
- }
- else if(gostx eq "300" and gosty eq "160")
- {
- r = random("2");
- if(r eq "0")
- {
- call("down" add q);
- }
- else if(r eq "1")
- {
- call("left" add q);
- }
- }
- else if(gostx eq "250" and gosty eq "180")
- {
- r = random("2");
- if(r eq "0")
- {
- call("up" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- }
- else if(gostx eq "300" and gosty eq "180")
- {
- r = random("2");
- if(r eq "0")
- {
- call("up" add q);
- }
- else if(r eq "1")
- {
- call("left" add q);
- }
- }
- else if(gostx eq "270" and gosty eq "140")
- {
- r = random("2");
- if(eval("munch" add q) eq "1")
- {
- call("down" add q);
- }
- else if(r eq "0")
- {
- call("left" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- }
- else if(gostx eq "280" and gosty eq "140")
- {
- r = random("2");
- if(eval("munch" add q) eq "1")
- {
- call("down" add q);
- }
- else if(r eq "0")
- {
- call("left" add q);
- }
- else if(r eq "1")
- {
- call("right" add q);
- }
- }
- if(eval("munch" add q) eq "0")
- {
- set("seek" add q,"0");
- }
- else if(eval("munch" add q) eq "1")
- {
- set("seek" add q,"1");
- }
- else if(eval("munch" add q) eq "2")
- {
- set("seek" add q,"2");
- }
- if(eval("seek" add q) eq "0")
- {
- targetx = dotx;
- targety = doty;
- }
- else if(eval("seek" add q) eq "1")
- {
- targetx = "270";
- targety = "170";
- }
- else if(eval("seek" add q) eq "2")
- {
- targetx = "270";
- targety = "170";
- }
- jump = random("2");
- if(jump eq "0")
- {
- if(targetx < gostx)
- {
- fart = "11111111111";
- ran = "2";
- }
- else if(gostx < targetx)
- {
- ran = "3";
- }
- else if(gostx == targetx)
- {
- fart = "222222";
- if(targety < gosty)
- {
- ran = "0";
- }
- else if(gosty < targety)
- {
- ran = "1";
- }
- }
- }
- if(jump eq "1")
- {
- if(targety < gosty)
- {
- fart = "3333333333";
- ran = "0";
- }
- else if(gosty < targety)
- {
- ran = "1";
- }
- else if(gosty == targety)
- {
- if(targetx < gostx)
- {
- fart = "4444444444";
- ran = "2";
- }
- else if(gostx < targetx)
- {
- ran = "3";
- }
- }
- }
- if(eval("go" add q) eq "0101")
- {
- if(ran == "0")
- {
- call("right" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("down" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "0111")
- {
- if(ran == "0")
- {
- call("left" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "0110")
- {
- if(ran == "0")
- {
- call("left" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("down" add q);
- }
- }
- else if(eval("go" add q) eq "1111")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "1011")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("right" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "1001")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("right" add q);
- }
- else if(ran == "2")
- {
- call("up" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "1010")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("left" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("up" add q);
- }
- }
- else if(eval("go" add q) eq "0011")
- {
- if(ran == "0")
- {
- call("right" add q);
- }
- else if(ran == "1")
- {
- call("left" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "1110")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("left" add q);
- }
- else if(ran == "3")
- {
- call("down" add q);
- }
- }
- else if(eval("go" add q) eq "1101")
- {
- if(ran == "0")
- {
- call("up" add q);
- }
- else if(ran == "1")
- {
- call("down" add q);
- }
- else if(ran == "2")
- {
- call("up" add q);
- }
- else if(ran == "3")
- {
- call("right" add q);
- }
- }
- else if(eval("go" add q) eq "xxx1")
- {
- call(last1);
- }
- else if(eval("go" add q) eq "xxxx")
- {
- call(last2);
- }
- else if(eval("go" add q) eq "xxx3")
- {
- call(last3);
- }
- else if(eval("go" add q) eq "xxx4")
- {
- call(last4);
- }
- }
- }
-